/* ----------------------- htmlparser/comment.js ------------------------ */
'use strict';
(function() {
   VED.htmlParser.comment = VED.htmlParser.node.extend({

      initialize: function( value ) {
         this.value = value;
         this._ = {
            isBlockLike: false
         }
      },

      type: 8,

      filter: function( filter ) {
         var comment = this.value;

         if( !( comment = filter.onComment( comment, this ) ) ) {
            this.remove();
            return false;
         }

         if( typeof comment != 'string' ) {
            this.replaceWith( comment );
            return false;
         }

         this.value = comment;

         return true;
      },

      writeHtml: function( writer, filter ) {
         if ( filter )
            this.filter( filter );

         writer.comment( this.value );
      }
   });
})();




